﻿using RSFrame.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConfigurationService
{
    class ConfigurationService : IConfigurationService
    {
        public string DBAddress => XmlHelper.GetInnerText("DBAddress");

        public bool RememberPassword
        {
            get => Convert.ToBoolean(XmlHelper.GetInnerText("RememberPassword"));
            set => XmlHelper.SetInnerText("RememberPassword", value.ToString());
        }

        public bool AutoLogin
        {
            get => Convert.ToBoolean(XmlHelper.GetInnerText("AutoLogin"));
            set => XmlHelper.SetInnerText("AutoLogin", value.ToString());
        }

        public string Account
        {
            get => XmlHelper.GetInnerText("Account");
            set => XmlHelper.SetInnerText("Account", value);
        }

        public string Password
        {
            get => XmlHelper.GetInnerText("Password");
            set => XmlHelper.SetInnerText("Password", value);
        }

    }
}
